var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
    })(e, t);
}, function(e, t) {
    function n() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, 
    new n());
}), a = this && this.__decorate || function(e, t, n, o) {
    var i, r = arguments.length, c = r < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, n) : o;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) c = Reflect.decorate(e, t, n, o); else for (var a = e.length - 1; 0 <= a; a--) (i = e[a]) && (c = (r < 3 ? i(c) : 3 < r ? i(t, n, c) : i(t, n)) || c);
    return 3 < r && c && Object.defineProperty(t, n, c), c;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("VideoItemView"), s = e("AudioManager"), c = e("GameConfig"), l = e("UIManager"), d = e("AdManager"), u = e("WebManager"), p = cc._decorator, h = p.ccclass, f = p.property, g = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.scrollView = null, e.itemPrefab = null, e.items = [], e;
    }
    return i(e, t), e.prototype.onLoad = function() {
        c.GC.isVaild("videoRank") && this.node.destroy();
    }, e.prototype.start = function() {
        this.init();
    }, e.prototype.init = function() {
        var t = this;
        this.items.length < c.GC.videoLikeList.length && this.schedule(function() {
            var e;
            t.items.length < c.GC.videoLikeList.length && ((e = cc.instantiate(t.itemPrefab)).scale = .6, 
            e.parent = t.scrollView.content, e.on(cc.Node.EventType.TOUCH_END, function() {
                s.default.getInstance().playAudio("按钮2"), u.default.getInstance().sentLog("点击结算界面视频排行榜"), 
                l.default.getInstance().loadPnl("video", null, function() {
                    d.default.getInstance().hideAllBanner();
                });
            }), e = e.getComponent(r.default), t.items.push(e), e.init(c.GC.videoLikeList[t.items.length - 1]));
        }, 1 / 60, Math.min(c.GC.videoLikeList.length - this.items.length, 10) - 1, 0);
    }, a([ f(cc.ScrollView) ], e.prototype, "scrollView", void 0), a([ f(cc.Prefab) ], e.prototype, "itemPrefab", void 0), 
    a([ h ], e);
}(cc.Component);

n.default = g;